{include file="public/header" /}
<style type="text/css">
	.aui-radio{width: 0.8rem;height: 0.8rem;vertical-align: middle;}
	.aui-list label{font-size: 0.5rem;display: -webkit-inline-box;display: table-cell;padding-right: 10px;}
</style>

<div class="aui-content wrap Personal">
	<div class="innercontent1">
        <form method="post" class="ajax-form" id="edit_profile" >
            <ul class="aui-list aui-form-list">
            	<li class="aui-list-header">基本信息</li>
				<li class="aui-list-item">
		            <div class="aui-list-item-inner">
		                <div class="aui-list-item-label">
		                    姓　 名
		                </div>
		                <div class="aui-list-item-input">
		                    <input type="text" name="realname" placeholder="*姓名" value="{$user['realname']}">
		                </div>
		            </div>
		        </li>
		        <li class="aui-list-item">
					<div class="aui-list-item-inner">
		                <div class="aui-list-item-label">
		                    性　 别
		                </div>
		                <div class="aui-list-item-input">
		                    <label><input class="aui-radio" type="radio" name="sex" value="0" {eq name="user.sex" value="0" }checked{/eq}> 保密</label>
                    		<label><input class="aui-radio" type="radio" name="sex" value="1" {eq name="user.sex" value="1" }checked{/eq}> 男</label>
                    		<label><input class="aui-radio" type="radio" name="sex" value="2" {eq name="user.sex" value="2" }checked{/eq}> 女</label>
		                </div>
		            </div>
		        </li>
		        <li class="aui-list-item">
					<div class="aui-list-item-inner">
		                <div class="aui-list-item-label">
		                    城　 市
		                </div>
		                <div class="aui-list-item-input my-win address-content" href="{:url('Area/index')}" title="城市选择">
		                    {:widget('Widget/wap_area_select', array('province_id,city_id',1,$user['province_id'],$user['city_id']))}
		                </div>
		            </div>
		        </li>
<!-- 		        <li class="aui-list-item">
		            <div class="aui-list-item-inner">
		                <div class="aui-list-item-label">
		                    邮　 箱
		                </div>
		                <div class="aui-list-item-input">
		                    <input type="text" name="email" placeholder="*电子邮箱地址" value="{$user['email']}">
		                </div>
		            </div>
		        </li> -->
            </ul>

            <div class="field submit-btn">
                <input type="submit" value="确认修改" class="btn_big1"/>
            </div>
        </form>
    </div>

    <div class="innercontent1">
        <form method="post" action="" id="edit_mobile" onSubmit="return checkMobileForm()">
        	<ul class="aui-list aui-form-list">
        		<li class="aui-list-header">手机绑定</li>
				<li class="aui-list-item">
		            <div class="aui-list-item-inner">
		                <div class="aui-list-item-label" style="width: 70%;">
		                    手机
		                </div>
		                <div class="aui-list-item-input" style="padding:0;">
		                    <input type="text" id="mobile" name="mobile" placeholder="*手机号码" value="{$user['mobile']}">
		                </div>
		                <div class="aui-list-item-input" style="width: 5rem;">
		                    <label for="mobile" style="opacity: 0;display: block;padding: 0;width: 5rem;">发送验证码</label>
		                </div>
		            </div>
		        </li>
		        <li class="aui-list-item">
		            <div class="aui-list-item-inner">
		                <div class="aui-list-item-label" style="width: 70%;">
		                    图片验证码
		                </div>
		                <div class="aui-list-item-input" style="padding:0;">
		                    <input type="text" name="imgcode" placeholder="*图片验证码" value="">
		                </div>
		                
		                <div class="aui-list-item-input" style="width: 5rem;">
		                    <img class="img-verify" href="{:captcha_src()}" src="{:captcha_src()}" style="width: 120px;height: 40px;">
		                </div>
		            </div>
		        </li>
		        <li class="aui-list-item">
		            <div class="aui-list-item-inner">
		                <div class="aui-list-item-label" style="width: 70%;">
		                    验证码
		                </div>
		                <div class="aui-list-item-input" style="padding:0;">
		                    <input type="text" name="sms_code" placeholder="*手机验证码" value="" >
		                </div>
		                <div class="aui-list-item-input" style="width: 5rem;">
		                    <button  class="get-smscode " autocomplete="off" sms-type="{$user['mobile'] ? 'change_mobile' : 'bind_mobile'}" url="{:url('get_smscode')}" type="button" style="font-size: 0.5rem;">发送验证码</button>
		                	<div class="smscode-time btn btn-primary" style="display: none"><span>60</span>s</div>
		                </div>
		            </div>
		        </li>
        	</ul>
            <div class="field submit-btn">
                <input type="submit" value="确认修改" class="btn_big1"/>
            </div>
        </form>
    </div>

    <div class="innercontent11">
        <form name="formPassword" action="{:url('UserCenter/change_password')}" method="post" class="ajax-form change_password" onSubmit="change_password();">
			<ul class="aui-list aui-form-list">
        		<li class="aui-list-header">{eq name="user.is_set_password" value="1"}修改密码{else/}密码设置{/eq}</li>
        		{eq name="user.is_set_password" value="1"}
				<li class="aui-list-item">
		            <div class="aui-list-item-inner">
		                <div class="aui-list-item-label">
		                    旧密码
		                </div>
		                <div class="aui-list-item-input">
		                    <input type="password" name="old_password" placeholder="原密码">
		                </div>
		            </div>
		        </li>
		        {/eq}
		        <li class="aui-list-item">
		            <div class="aui-list-item-inner">
		                <div class="aui-list-item-label">
		                    新密码
		                </div>
		                <div class="aui-list-item-input">
		                    <input type="password" name="new_password" placeholder="新密码" >
		                </div>
		            </div>
		        </li>
		        <li class="aui-list-item">
		            <div class="aui-list-item-inner">
		                <div class="aui-list-item-label">
		                    确认密码
		                </div>
		                <div class="aui-list-item-input">
		                    <input type="password" name="repassword" placeholder="确认密码">
		                </div>
		            </div>
		        </li>
        	</ul>
            <div class="field submit-btn">
                <input type="submit" value="确认修改" class="btn_big1"/>
            </div>
        </form>
    </div>
</div>
<script type="text/javascript">
function change_password(){
	$('input[type="password"]').each(function () {
		if(!$(this).hasClass('not-md5') && $(this).val()){
			var password     = $(this).val();
			var password_md5 = $.md5(password);
			$(this).val(password_md5);
		}
	});
}
</script>
{include file="public/footer" /}